package com.coffee.statistics.api.service;

import com.coffee.core.entity.Page;
import com.coffee.core.entity.PagerInfo;
import com.coffee.core.exception.BusinessException;
import com.coffee.statistics.api.query.StatisticsQuery;
import com.coffee.statistics.api.result.StatisticsResult;
import com.coffee.statistics.api.result.TotalStatisticsResult;


import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;


public interface StatisticsService {

    Page<StatisticsResult> getPager(StatisticsQuery param, PagerInfo pr);

    Integer count(StatisticsQuery param);

    StatisticsResult getDetail(Integer id);

    List<StatisticsResult> getList(StatisticsQuery param, PagerInfo pr);

    List<StatisticsResult> getList(StatisticsQuery param);

    List<StatisticsResult> getList();

    void delete(Integer id);

    void addOrUpdate(StatisticsResult result) throws BusinessException;

    Map<Integer, StatisticsResult> getItemMap(Set<Integer> idSet);

    Map<Integer, StatisticsResult> getItemMap();

    void addByDay(Date startTime, Date endTime);

    TotalStatisticsResult getTotalStatisticsResult(String Date);
}